﻿<ErrorBoundary>
    <ChildContent>
        <MudPopoverProvider></MudPopoverProvider>
        <MudMenu Label="Open Menu">
            <ChildContent>
                <MudMenuItem @onclick="@HandleClickAsync">Throw error</MudMenuItem>
            </ChildContent>
        </MudMenu>
        <br/>
    </ChildContent>
    <ErrorContent>
        <MudAlert Severity="Severity.Error">Oh my! We caught an error and handled it!</MudAlert>
    </ErrorContent>
</ErrorBoundary>

@code {
    public async Task HandleClickAsync()
    {
        await Task.Delay(100);
        throw new Exception("Something went wrong...");
    }
}
